<?php

class Date {
  private $t;
  
  public function __construct( $str = null ) {
    if ( is_null( $str ) ) {
      $str = time();
    }
    if ( is_int( $str ) ) {
      $this->t = $str;
      return;
    }
    if ( is_string( $str ) ) {
      if ( preg_match( '/([0-9]{1,2})[\/\.]([0-9]{1,2})[\/\.]([0-9]{4})/', $str, $m ) ) {
        $this->t = mktime( 0, 0, 0, $m[2], $m[1], $m[3] );
        return;
      }
    }
    $this->t = strtotime( $str );
  }
  
  
}



?>